<!--
 * @file 全局布局
 * @author its-wild(https://gitee.com/its-wild)
 * @date 2021/07/16
-->
<template>
  <main class="global-container">
    <router-view
      v-if="$route.meta.keepAlive"
      v-slot="{ Component }"
    >
      <keep-alive>
        <component :is="Component" />
      </keep-alive>
    </router-view>
    <router-view v-else />
  </main>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
  name: 'GlobalLayout'
})
</script>

<style scoped lang="less">

</style>
